<include file="public@header" />
<script type="text/html" id="photos-item-tpl">
    <li id="saved-image{id}">
        <input id="photo-{id}" type="hidden" name="photo_urls[]" value="{filepath}">
        <input class="form-control" id="photo-{id}-name" type="text" name="photo_names[]" value="{name}"
               style="width: 200px;" title="图片名称">
        <img id="photo-{id}-preview" src="{url}" style="height:36px;width: 36px;"
             onclick="imagePreviewDialog(this.src);">
        <a href="javascript:uploadOneImage('图片上传','#photo-{id}');">替换</a>
        <a href="javascript:(function(){$('#saved-image{id}').remove();})();">移除</a>
    </li>
</script>
<script type="text/html" id="files-item-tpl">
    <li id="saved-file{id}">
        <input id="file-{id}" type="hidden" name="file_urls[]" value="{filepath}">
        <input class="form-control" id="file-{id}-name" type="text" name="file_names[]" value="{name}"
               style="width: 200px;" title="文件名称">
        <a id="file-{id}-preview" href="{preview_url}" target="_blank">下载</a>
        <a href="javascript:uploadOne('文件上传','#file-{id}','file');">替换</a>
        <a href="javascript:(function(){$('#saved-file{id}').remove();})();">移除</a>
    </li>
</script>
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('user/ygindex',array('id'=>$mdid))}">员工列表</a></li>
			<li class="active"><a>添加员工</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('user/ygaddpost')}">
			<div class="form-group">
				<label for="input-user_login" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('USERNAME')}</label>
				<div class="col-md-6 col-sm-10">
					<input type="hidden" name="mdid" value="{$mdid}">
					<input type="hidden" name="user_type" value="2">
					<input type="hidden" name="user_type" value="2">
					<input type="text" class="form-control" id="input-user_login" name="user_login">
				</div>
			</div>
			<div class="form-group">
				<label for="input-user_pass" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('PASSWORD')}</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-user_pass" name="user_pass" placeholder="******">
				</div>
			</div>
			<div class="form-group">
				<label for="input-user_email" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('EMAIL')}</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-user_email" name="user_email">
				</div>
			</div>
			<div class="form-group">
				<label for="input-user_email" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('ROLE')}</label>
				<div class="col-md-6 col-sm-10">
					<foreach name="roles" item="vo">
						<label class="checkbox-inline">
							<input value="{$vo.id}" type="checkbox" name="role_id[]" <if condition="cmf_get_current_admin_id() neq 1 && $vo['id'] eq 1">disabled="true"</if>>{$vo.name}
						</label>
					</foreach>
				</div>
			</div>

			 <div class="form-group">
				<label for="input-user_nickname" class="col-sm-2 control-label"><span class="form-required">*</span>基本资料</label>
				<div class="col-md-6 col-sm-10">
					
				</div>
			</div>
			<div class="form-group">
				<label for="input-user_nickname" class="col-sm-2 control-label"><span
						class="form-required">*</span>姓名</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-user_nickname" name="user_nickname">
				</div>
			</div>
			<div class="form-group">
				<label for="input-user_nickname" class="col-sm-2 control-label"><span class="form-required">*</span>性别</label>
				<div class="col-md-6 col-sm-10">
					<select name="sex" id="input-sex" class="form-control">
						<option value="1">男</option>
						<option value="2">女</option>
					</select>
				</div>
			</div>

			<div class="form-group">
				<label for="input-user_tel" class="col-sm-2 control-label">联系电话</label>
				<div class="col-md-6 col-sm-10">
					<input type="number" class="form-control" id="input-user_tel" name="user_tel">
				</div>
			</div>

			<div class="form-group">
				<label for="input-user_minzu" class="col-sm-2 control-label">民族</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-user_minzu" name="user_minzu">
				</div>
			</div>

			<div class="form-group">
				<label for="input-user_jiguan" class="col-sm-2 control-label">籍贯</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-user_jiguan" name="user_jiguan">
				</div>
			</div>

			<div class="form-group">
				<label for="input-user_jiguan" class="col-sm-2 control-label">工作状态</label>
				<div class="col-md-6 col-sm-10">
					<select name="user_gzzt" id="input-user_gzzt" class="form-control">
						<option value="0">全职</option>
						<option value="1">兼职</option>
					</select>
				</div>
			</div>

			<div class="form-group">
				<label for="input-user_dizhi" class="col-sm-2 control-label">现居住地</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-user_dizhi" name="user_dizhi">
				</div>
			</div>

			<div class="form-group">
				<label for="input-user_bankname" class="col-sm-2 control-label">开户银行</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-user_bankname" name="user_bankname">
				</div>
			</div>
			
			<div class="form-group">
				<label for="input-user_banknum" class="col-sm-2 control-label">银行账号</label>
				<div class="col-md-6 col-sm-10">
					<input type="number" class="form-control" id="input-user_banknum" name="user_banknum">
				</div>
			</div>
			
			<div class="form-group">
				<label for="input-user_bankkhm" class="col-sm-2 control-label">开户名</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-user_bankkhm" name="user_bankkhm">
				</div>
			</div>
			<div class="form-group">
				<label for="input-user_bankkhm" class="col-sm-2 control-label">相关证件</label>
				<div class="col-md-6 col-sm-10">
					<ul id="photos" class="pic-list list-unstyled form-inline"></ul>
					<a href="javascript:uploadMultiImage('图片上传','#photos','photos-item-tpl');" class="btn btn-default btn-sm">选择图片</a>
				</div>
			</div>

			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
				</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>